package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFpFaUserFeedbackDao;
import com.financing.platform.dto.FpFaUserFeedbackDTO;
import com.financing.platform.util.SqlName;
/**
 * fp_fa_user_feedback  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpFaUserFeedbackDao")
public class FpFaUserFeedbackDaoImpl extends BaseDaoImpl implements IFpFaUserFeedbackDao {


	@Override
	public int insert(FpFaUserFeedbackDTO fpFaUserFeedback) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FpFaUserFeedbackSql.insert, fpFaUserFeedback);
	}

	@Override
	public void update(FpFaUserFeedbackDTO fpFaUserFeedback) throws SQLException {
		this.sqlMapClient.update(SqlName.FpFaUserFeedbackSql.update, fpFaUserFeedback);
	}

	@Override
	public void updateForce(FpFaUserFeedbackDTO fpFaUserFeedback) throws SQLException {
		this.sqlMapClient.update(SqlName.FpFaUserFeedbackSql.updateForce, fpFaUserFeedback);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpFaUserFeedbackSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpFaUserFeedbackDTO> queryList(FpFaUserFeedbackDTO fpFaUserFeedback) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FpFaUserFeedbackSql.queryList, fpFaUserFeedback);
	}

	@Override
	public int queryListCount(FpFaUserFeedbackDTO fpFaUserFeedback) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FpFaUserFeedbackSql.queryListCount, fpFaUserFeedback);
	}

	@Override
	public FpFaUserFeedbackDTO loadById(Integer id) throws SQLException {
		return  (FpFaUserFeedbackDTO)this.sqlMapClient.queryForObject(SqlName.FpFaUserFeedbackSql.loadById,id);
	}
 	
}
